﻿using System;
using System.Collections.Generic;
using System.Web;

namespace Ecreate.Web
{
    public class HtmlHelper
    {
        public static string getPostValue(System.Web.UI.Page page)
        {
            string value= page.Request.Form["__EVENTARGUMENT"];
            return value;
        }

        public static void ShowAlertMessage(System.Web.UI.Page page,string Message)
        {
            string script = "<script type=\"text/javascript\" language=\"javascript\">     alert('{0}!')　　; </script>";
            script = string.Format(script,Message);
            page.Response.Write(script);
        }

        public static void ShowMessage(System.Web.UI.Page page, string Message)
        {

            string script = "<script type=\"text/javascript\" language=\"javascript\">     alert('{0}!')　　; </script>";
            script = string.Format(script, Message);
            page.ClientScript.RegisterClientScriptBlock(page.GetType(),DateTime.Now.ToString(),script);
        }

        public static string GetMessage(System.Web.UI.Page page, string Message)
        {
            string script = "  alert('{0}!')　　;";
            script = string.Format(script, Message);
            return script;
        }

    }
}
